﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CanDoo.Oil.Core.Models;


namespace CanDoo.Oil.Core.DTOs
{
    /// <summary>
    /// 商品列表专用实体
    /// </summary>
    public class ProductItem
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "数据Id")]
        public long Id { get; set; }

        /// <summary>
        /// 关联实体ID
        /// </summary>
        [Display(Name = "关联实体ID")]
        public long LinkEntityId{ get; set; }

        /// <summary>
        /// 商品
        /// </summary>
        [Display(Name = "商品")]
        public Product Product { get; set; }

        /// <summary>
        /// 商品Id
        /// </summary>
        [Display(Name = "商品ID")]
        public long ProductId { get; set; }

        /// <summary>
        /// 商品种类 0普通商品 1油 2售油机
        /// </summary>
        [Display(Name = "商品种类")]
        public int ProductClass { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [Display(Name = "商品名称")]
        public string Name { get; set; }

        /// <summary>
        /// 商品条码
        /// </summary>
        [Display(Name = "商品条码")]
        public string SN { get; set; }

        /// <summary>
        /// 商品编码
        /// </summary>
        [Display(Name = "商品编码")]
        public string Code { get; set; }

        /// <summary>
        /// 型号
        /// </summary>
        [Display(Name = "型号")]
        public string Model { get; set; }

        /// <summary>
        ///规格
        /// </summary>
        [Display(Name = "规格")]
        [StringLength(50)]
        public string Specifications { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Display(Name = "单位")]
        public string Unit { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        [Display(Name = "单价")]
        public double? Price { get; set; }


        /// <summary>
        /// 数量
        /// </summary>
        [Display(Name = "数量")]
        public double? Num { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        [Display(Name = "总金额")]
        public double? Money { get; set; }

        /// <summary>
        /// 变化数量
        /// </summary>
        [Display(Name = "变化数量")]
        public double? ChangeNum { get; set; }


        /// <summary>
        /// 变化单价
        /// </summary>
        [Display(Name = "变化单价")]
        public double? ChangePrice { get; set; }

        /// <summary>
        /// 变化金额
        /// </summary>
        [Display(Name = "变化金额")]
        public double? ChangeMoney { get; set; }

        /// <summary>
        ///出入库方向1/-1
        /// </summary>
        [Display(Name = "出入库方向")]
        public int Coefficient { get; set; }

        /// <summary>
        ///序列号管理链接
        /// </summary>
        [Display(Name = "序列号管理链接")]
        public string SerialNum { get; set; }
    }
}
